//
// Created by 王岩松 on 2020/3/24.
//

#ifndef FORMANT_RESAMPLE_H
#define FORMANT_RESAMPLE_H

//    vector<double> A = {1,2,3,4,5,6,7,8,9,10}, B;
//    ofstream ffout("D:/out.txt");
//    rresample(2048,100,A,B);
//    for ( int i = 0, n = B.size(); i < n; i++ )
//        ffout << B[i] << " ";
//    ffout<< endl;

//RESAMPLE  Change the sampling rate of a signal.
//   Y = RESAMPLE(UpFactor, DownFactor, InputSignal, OutputSignal) resamples the sequence in
//   vector InputSignal at UpFactor/DownFactor times and stores the resampled data to OutputSignal.
//   OutputSignal is UpFactor/DownFactor times the length of InputSignal. UpFactor and DownFactor must be
//   positive integers.

//This function is translated from Matlab's Resample funtion.

//Author: Haoqi Bai

#include <boost/math/special_functions/bessel.hpp>

#include <vector>

using namespace std;

void rresample ( int upFactor, int downFactor,
                vector<double>& inputSignal, vector<double>& outputSignal );

#endif //FORMANT_RESAMPLE_H
